package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.Student;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

@Mapper
public interface StudentMapper extends BaseMapper<Student> {
    @Update("update student set violation_count = violation_count +1, violation_score = violation_score + #{score}\n" +
            "    where id = #{id}")
    void updateScore(Integer id, Integer score);
    /*  @Update("update s set score = score + #{score} where id = #{id}")*/
}
